<div class="site_section_header">
	Add/Edit a user
</div>
<div class="site_section_subheader">
	User User = Full access to Page Content &amp; Projects, Admin = Access to add &amp; view projects only.
</div>

<div id="users_main_wrapper">
	
	<form action="/" method="post" onsubmit="return false;">
	
	<div class="eu_section">
		<div class="eus_header"><div class="eus_header_name">User details</div></div>
		
		<div class="eus_content">
			<div class="eu_field_wrapper">
				<div class="eu_field_title">First name</div>
				<div class="eu_field"><input type="text" id="user_fname" value="<?php echo $oUser->user_fname; ?>" /></div>
				<div class="clear"><!-- --></div>
			</div>
			<div class="eu_field_wrapper">
				<div class="eu_field_title">Last name</div>
				<div class="eu_field"><input type="text" id="user_lname" value="<?php echo $oUser->user_lname; ?>" /></div>
				<div class="clear"><!-- --></div>
			</div>
			<div class="eu_field_wrapper">
				<div class="eu_field_title">Email address</div>
				<div class="eu_field"><input type="text" id="user_email" value="<?php echo $oUser->user_email; ?>" /></div>
				<div class="clear"><!-- --></div>
			</div>
			<div class="eu_field_wrapper">
				<div class="eu_field_title">User rights</div>
				<div class="eu_field">
					<select id="group_id">
						<?php
						
						foreach ($qSecGroups->result() as $oSecGroup)
						{
							$sSelected = '';
							
							if ($oSecGroup->group_id == $iUserSecGroup)
							{
								$sSelected = ' selected="selected"';	
							}
							
							?>
							<option value="<?php echo $oSecGroup->group_id; ?>"<?php echo $sSelected; ?>><?php echo $oSecGroup->group_name; ?></option>
							<?php
						}
						
						?>
					</select>
				</div>
				<div class="clear"><!-- --></div>
			</div>
		</div>
	</div>
	
	<div class="eu_section">
		<div class="eus_header"><div class="eus_header_name">Password settings</div><?php if($oUser->user_id > 0){ ?> <span style="padding: 2px; font-size: 10px;">To leave the password as it is, leave the password fields blank</span><?php } ?></div>
		
		<div class="eus_content">
			<div class="eu_field_wrapper">
				<div class="eu_field_title">Password</div>
				<div class="eu_field"><input type="password" id="user_passwd" value="" /></div>
				<div class="clear"><!-- --></div>
			</div>
			<div class="eu_field_wrapper">
				<div class="eu_field_title">Re-type Password</div>
				<div class="eu_field"><input type="password" id="user_passwd_chk" value="" /></div>
				<div class="clear"><!-- --></div>
			</div>
		</div>
	</div>
	
	<div style="padding: 2px;">
		<input type="image" id="edit_user_save_button" src="/assets/images/web/admin/buttons/save.png" /> 
		<a href="/admin/user_control"><img src="/assets/images/web/admin/buttons/cancel.png" style="border:none;" /></a>
		<input type="hidden" id="user_id" value="<?php echo $oUser->user_id; ?>" />
	</div>
	
	</form>

</div>